package br.com.unifebe.tcc.componente.GUI;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

import javax.swing.JButton;

@SuppressWarnings("serial")
public class JCFButton extends JButton{
	
	public JCFButton() {
		this( null );
	}

	public JCFButton( String string )  {
		super( string );
		this.addKeyListener(new KeyAdapter() {
			@Override
			public void keyPressed(KeyEvent e) {
				if ( e.getKeyCode() == 10 ) {
					doClick();
				}
			}
		});
	}

}